<template>
    <div v-if="isLoadingRef">
        <DataList :list="listRef"></DataList>
    </div>
</template>
<script setup lang='ts'>
import { onMounted, ref } from 'vue';
import DataList from './DataList.vue';
import { TypeApiCommentI } from '~@/api/apiTypes';
import { getComments } from '~@/api/blog';

const listRef=ref<TypeApiCommentI[]>([]);
const isLoadingRef=ref(true);

onMounted(async ()=>{
    const reponsePage=await getComments(1);
    console.log('reponsePage',reponsePage);
    
    listRef.value=reponsePage.rows;
    isLoadingRef.value=true;
})
    ////#region defineXxx
    //defineOptions({
        //name:
    //});

    //const props=defineProps({
        //propA:{
            //type:String,
            //required:true
        //},
        //propB:{
            //type:Number,
            //default:1
        //},
        //propC:{
            //type:String as PropType<MyType>,
            //required:true
        //},
    //});

    //const emit = defineEmits<{
        //event1:[para1:number,para2:string],
        //event2:[para1:number,para2:string],
    //}>();
    ////#endregion
    
    
</script>
<style lang='less' scoped>
    
</style>